package com.fay.designPattern.pattern.create.singleton;

import java.util.concurrent.atomic.AtomicLong;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/4/3 21:58
 * @Version 1.0
 */
public enum IdGeneratorEnum {
    INSTANCE;
    private AtomicLong id = new AtomicLong(0);

    public long getId(){
        return id.incrementAndGet();
    }
}
